﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<z.m.Messenger>" %>

<% if (ViewData["type"] == "header") {%>
<tr id="add" data-id="0">
	<td><%:Html.EditorFor(m=>m.Msg) %></td>
	<td>
		<input type="button" value="Send" <%:User.Identity.IsAuthenticated?"":"disabled" %> onclick='ajaxTrSubmit(event);' /></td>
</tr>
<%} else { %>
<tr data-id="<%:ViewBag.ID%>">
	<td colspan="2">
		<div class="r<%:Html.DisplayFor(m=>m.User.CurrentRole)%>">
			<%:Html.DisplayFor(m=>m.User.First_Name)%>
			<%:Html.DisplayFor(m=>m.User.Last_Name)%>
				(<%:Html.DisplayFor(m=>m.User.UserName)%>)
				 - <%:Html.DisplayFor(m=>m.dateTime,"dd/mm/yy hh:mm") %>
			<br />
			<%:Html.DisplayFor(m=>m.Msg)%>
		</div>
	</td>
</tr>
<%}%>
